#ifndef _WX_RESULTNOTEBOOK_H_
#define _WX_RESULTNOTEBOOK_H_

#include "wx/notebook.h"
#include "wx/listctrl.h"
#include "wx/grid.h"
#include "wx/aui/auibook.h"
#include "wx/laywin.h"
#include "Control_Pref.h"
#include "ResultTable.h"
#include "../Editor/edit.h"


WX_DECLARE_OBJARRAY(ResultGridTable*,wxResultGridTableArray);

class ResultNotebook  : public wxAuiNotebook
{
public:
	void ClearMessageText();
	ResultArray GetResults();
	void BindResult(ResultArray& result,int sets_count);
	Edit* GetSQLEditor();
	wxTextCtrl* GetTextCtrl();
	wxWindow* GetListCtrl();
	ResultNotebook(wxWindow* parent, wxWindowID id, 
		const wxPoint& pos = wxDefaultPosition, 
		const wxSize& size = wxDefaultSize);
	~ResultNotebook();
	wxTextCtrl* GetMessgae() { return message; }
	Edit* GetText() { return txt_result; }
	wxGridArray GetGridArray() { return gridArray; }
	wxWindow* GetResultPanel() { return resultPanel; }
	wxAuiManager m_mgr;
private:
	ResultArray resultArray;
	wxWindow* resultPanel;
	wxTextCtrl* message;
	Edit*	txt_result;
	wxGridArray gridArray;
	wxResultGridTableArray resultGridTableArray;
	friend class UIThread;
};

#endif